package com.atguigu.gulimall.seckill.scheduled;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.concurrent.TimeUnit;


//@EnableScheduling
@Component
@Slf4j
//@EnableAsync
public class HelloScheduled {
//    @Scheduled(cron = "* * * ? * 6")
//    @Async
    public void hello() throws InterruptedException {
        log.info("hello");
        TimeUnit.SECONDS.sleep(3);
    }
}
